package com.qf.mapper;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qf.pojo.Recycle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

@Mapper
public interface RecycleMapper extends BaseMapper<Recycle> {
    @Select("SELECT *  FROM recycle r LEFT JOIN USER u ON r.user_id=u.user_id ${ew.customSqlSegment}")
    Page<Recycle> getPage(Page<Recycle> page, @Param(Constants.WRAPPER)QueryWrapper<Recycle> wrapper);

    @Select("SELECT *  FROM recycle r LEFT JOIN USER u ON r.user_id=u.user_id ${ew.customSqlSegment}")
    Recycle findOne(@Param(Constants.WRAPPER)QueryWrapper<Recycle> wrapper);
}
